package com.kimoge.spring6.ioc.resource.service;

import com.kimoge.spring6.ioc.resource.dao.UserDao;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * @author kimoge
 * @date 2025/8/25
 * @description
 */
@Service(value = "myUserService")
public class UserServiceImpl implements UserService {
//    @Resource(name = "myUserDao")
//    private UserDao userDao;
    @Resource
    private UserDao myUserDao;

    public void setUserDao(UserDao userDao) {
        this.myUserDao = userDao;
    }

    @Override
    public void sayHello() {
        System.out.println("userServiceImpl sayHello");
        myUserDao.sayHello();
    }
}
